package com.wildish.core;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.XmlWebApplicationContext;

/**
 * 系统初始化方法
 */
public class InitializeSystemEnv {
	private static XmlWebApplicationContext applicationContext;
	
	private InitializeSystemEnv(){
		System.out.println("========================init=====================");
	}
	
	public synchronized void init() throws Exception{
		
	}
	
	public void destroy(){
		System.out.println("========================destroy=====================");
	}
	
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		applicationContext = (XmlWebApplicationContext)applicationContext;
	}
	public static XmlWebApplicationContext getXmlWebApplicationContext() {
		return applicationContext;
	}
}